public class // 几何形状接口
interface Shape {
    void draw();
}

// 点类
class Point implements Shape {
    private int x;
    private int y;

    public Point(int x, int y) {
        this.x = x;
        this.y = y;
    }public class Main {
    public static void main(String[] args) {
        Point point = new Point(1, 2);
        Line line = new Line(new Point(3, 4), new Point(5, 6));
        Circle circle = new Circle(new Point(7, 8), 9);

        Shape[] shapes = {point, line, circle};

        for (Shape shape : shapes) {
            shape.draw();
        }
    }
}


    @Override
    public void draw() {
        System.out.println("Drawing a point at (" + x + ", " + y + ")");
    }
}

// 线类
class Line implements Shape {
    private Point start;
    private Point end;

    public Line(Point start, Point end) {
        this.start = start;
        this.end = end;
    }

    @Override
    public void draw() {
        System.out.println("Drawing a line from (" + start.x + ", " + start.y + ") to (" + end.x + ", " + end.y + ")");
    }
}

// 圆类
class Circle implements Shape {
    private Point center;
    private int radius;

    public Circle(Point center, int radius) {
        this.center = center;
        this.radius = radius;
    }

    @Override
    public void draw() {
        System.out.println("Drawing a circle with center at (" + center.x + ", " + center.y + ") and radius " + radius);
    }
}
Main {
    public static void main(String[] args) {
        System.out.println("Hello world!");
    }
}